﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HR_Business
{
    public partial class Designation
    {
         HRDBContext _DatabaseContext;

        public Designation() : this(new HRDBContext()) { }

        public Designation(HRDBContext HRDBContext)
        {
            _DatabaseContext = HRDBContext;
        }
       
        public Designation GetDesignationByDesignationId(int DesignationId)
        {
            return _DatabaseContext.Designations.FirstOrDefault(Designation => Designation.Id == DesignationId);
        }

        public List<Designation> GetAllDesignations()
        {
            return _DatabaseContext.Designations.ToList();
        }

    }
}
